package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.competitor.SimpleDynamicEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author gaojie
 * @version v1.0
 * @date 2022/8/10 16:25
 * @since v1.0
 */
@Repository
@Mapper
public interface SimpleDynamicDao {

    /**
     * 插入数据
     */
    Integer insert(SimpleDynamicEntity simpleDynamic);


    /**
     * 根据主键id和公司id查询
     */
    SimpleDynamicEntity getByKey(@Param("id") Long id,@Param("corpid") String corpid);


    List<SimpleDynamicEntity> findEntities(@Param("param")Map<String,Object> param);

    void insertBatch(List<SimpleDynamicEntity> list);


    /**
     * 根据条件获取动态数量
     * @param param 查询条件
     * @return
     */
    Integer getEntitysCount(@Param("param") Map<String, Object> param);

}
